<?php
/**
 * Created by phpstorem.
 * User: yangakw@qq.com
 * Sign: 猥琐发育，别浪
 * Date: 2018/6/3 0003
 * Time: 下午 8:07
 */

namespace App\Http\Controllers;


use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class Cros extends Controller
{
    function reommond(Request $req){
        $cond = [];
        $conn = DB::table('goods_taobao');
        if($req->get('search')){
            $search = $req->get('search');
            $conn->where('goods_name', 'like', $search.'%')
                ->orWhere('cate', 'like', $search.'%');
        }
        $goods_taobao = $conn->paginate(15);
        self::json($goods_taobao);
    }
}